<cpanel include="../../../config.php">

<?

/***************************************************************************
 *                                 password_protect.php
 *                            -------------------
 *   Begin                : Thursday, April 16, 2005
 *   Copyright            : (C) 2005 Point and Code
 *   Domain               : http://www.pointandcode.com/
 *   Email                : support@pointandcode.com
 *   Version              : 1.0.0
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

$html_root_path = '../../../';
$page_title = "Pasword Protect Directory";
include $root_path.'common.php';
include $root_path.'page_header.php';

$template->set_filenames(array(
	'body' => $root_path.$template_path.'files/manager/password_protect.tpl')
);

$dir = <<<EOFpacman
<cpanel print="$FORM{'dir'}">
EOFpacman;

$s_hidden_vars = '<input type="hidden" name="dir" value="'.$dir.'">';

$check_protected = <<<EOFpacman
<cpanel Htaccess="checkprotected($FORM{'dir'})">
EOFpacman;

$protected_name = <<<EOFpacman
<cpanel Htaccess="resname($FORM{'dir'})">
EOFpacman;

$s_users = <<<EOFpacman
<cpanel Htaccess="showusers($FORM{'dir'})">
EOFpacman;


$template->assign_vars(array(
	'DIRECTORY' => $dir,
	
	'S_CHANGE_PROTECTION' => "password_protect_change_done.php",
	'S_DELETE_USER' => "password_protect_user_delete_done.php",
	'S_NEW_USER' => "password_protect_user_new_done.php",
	'S_HIDDEN_VARS' => $s_hidden_vars,
	'CHECK_PROTECTED' => $check_protected,
	'PROTECTED_NAME' => $protected_name,
	'S_USERS' => $s_users,
	));


//
// Woohoo! All done!
//
$template->pparse('body');




include $root_path.'page_tail.php';




?>

